Data Types
The data types and isolation levels supported by the .NET data provider depend on the data store to which you are connecting.
Table 10-1 lists the data types supported by the .NET data provider and how they are mapped to the .NET Framework types. You can use the table to infer the data types that will be used when a DataSet is filled using a DataAdapter. This table also identifies the proper accessors for accessing the data when a DataReader object is used directly.
- The SequeLink data type column refers to the native type name.
- The SequeLinkDbType column refers to the SequeLink data provider's type enumeration. Generally, there is a one to one mapping between the native type and the SequeLinkDbType.
- The .NET Framework Type column refers to the base data types available in the framework.
- The .NET Framework Typed Accessor column refers to the method that must be used to access a column of this type when using a DataReader.
Mapping Parameter Data Types
The type of the parameter is specific to each data provider. The .NET data provider must convert the parameter value to a native format before sending it to the server. The best way for an application to describe a parameter is to use the data provider-specific type enumeration.
In generic programming circumstances, the data provider-specific type may not be available. When no provider-specific DB type has been specified, the data type will be inferred from either the System.Data.DbType or from the .NET framework type of the parameter's value.
The .NET data provider uses the following order when inferring the data type of a parameter:
- The data provider uses the provider-specific data type if it has been specified.
- The data provider infers the data type from the System.Data.DbType if it has been specified, but the provider-specific data type has not been specified.
- The data provider infers the data type from the .NET Framework type if neither the provider-specific data type nor the System.Data.DbType have been specified.
Table 10-2 shows how SequeLink infers its types if only the System.Data.DbType is specified.
Table 10-3 shows the mapping that the data provider uses to infer a data type if neither the provider-specific data type or the System.Data.DbType are provided.